package cn.lili.controller.feign.wallet;

import cn.lili.common.security.enums.SceneEnums;
import cn.lili.modules.payment.client.WalletPointClient;
import cn.lili.modules.payment.entity.dto.UserPointUpdateDTO;
import cn.lili.modules.wallet.service.WalletService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequiredArgsConstructor
public class WalletPointFeignController implements WalletPointClient {


    private final WalletService walletService;

    @Override
    public Double getUserPoint(String userId) {
        return walletService.getWalletVO(userId).getPoints();
    }

    @Override
    public void updateMemberPoint(UserPointUpdateDTO userPointUpdateDTO) {
        walletService.updateMemberPoint(userPointUpdateDTO);
    }
}
